package com.tgy.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tgy.pojo.SysRolePermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;


/**
 * 系统角色权限关联表;(sys_role_permission)表数据库访问层
 * @author : http://www.chiner.pro
 * @date : 2022-6-20
 */
@Mapper
public interface SysRolePermissionMapper  extends BaseMapper<SysRolePermission>{

    /**
     * 根据角色ID集合查询
     * @param roleIds 角色ID集合
     */
     List<SysRolePermission> queryByRoleIds(@Param("roleIds") Collection<String> roleIds);

    int deleteByRid(List<String> rids);

    int deleteByPid(List<String> pids);

    int insertByList(List<SysRolePermission> rolePermissions);
}